﻿#ifndef _TIANYU_CODE_DEF_H
#define _TIANYU_CODE_DEF_H

#include <map>

enum EServiceType
{
	CLIENT = 0x00,
	PROXY_SERVICE = 0x01,//proxy服务
	MAP_SERVICE = 0x02,//MAP服
	GAME_SERVICE = 0x03,//游戏服务
	DB_SERVICE = 0x04,//存盘服务
	CHAT_SERVICE = 0x05,
	LOGIN_SERVICE = 0x06,//登录服务
	GATE_SERVICE = 0x07,//网关服务
	WORLD_PROXY_SERVICE = 0x08,//大世界proxy服务
	LOG_SERVICE = 0x09,// 日志服务　
	MATCH_SERVICE = 0x0A,//匹配服务器
	PLATFORM_PROXY_SERVICE = 0x0B, //平台服务器代理
	PLATFORM_SERVICE = 0x0C,//平台服
	PLATFORM_PHP_SERVICE = 0x0D,//php客户端
};

static std::map<int32_t, std::string> server_name_map_ = {
	std::make_pair< int32_t, std::string >(PROXY_SERVICE, "proxy_service"),
	std::make_pair< int32_t, std::string >(MAP_SERVICE, "map_service"),
	std::make_pair< int32_t, std::string >(GAME_SERVICE, "game_service"),
	std::make_pair< int32_t, std::string >(DB_SERVICE, "db_service"),
	std::make_pair< int32_t, std::string >(CHAT_SERVICE, "chat_service"),
	std::make_pair< int32_t, std::string >(LOGIN_SERVICE, "login_service"),
	std::make_pair< int32_t, std::string >(GATE_SERVICE, "gate_service"),
	std::make_pair< int32_t, std::string >(WORLD_PROXY_SERVICE, "world_proxy_service"),
	std::make_pair< int32_t, std::string >(LOG_SERVICE, "log_service"),
	std::make_pair< int32_t, std::string >(MATCH_SERVICE, "match_service"),
	std::make_pair< int32_t, std::string >(PLATFORM_PROXY_SERVICE, "platform_proxy_service"),
	std::make_pair< int32_t, std::string >(PLATFORM_SERVICE, "platform_service"),
	std::make_pair< int32_t, std::string >(PLATFORM_PHP_SERVICE, "php_service"),
};

#endif